import { Button } from "@/components/ui/button"
import Link from "next/link"
import { getServerSession } from "next-auth"

export default async function HomePage() {
  const session = await getServerSession()

  return (
    <div className="flex flex-col items-center justify-center flex-1 space-y-8 py-16">
      <h1 className="text-4xl font-bold">欢迎来到 History Shuffle</h1>
      <p className="text-center text-xl text-gray-600">
        测试你的历史知识，挑战你的时间感知能力
      </p>
      {session ? (
        <Link href="/game">
          <Button size="lg">开始游戏</Button>
        </Link>
      ) : (
        <Link href="/auth/login">
          <Button size="lg">登录开始</Button>
        </Link>
      )}
    </div>
  )
}
